package io.github.lee.jel.ui.main.media

import android.content.Context
import android.view.LayoutInflater
import android.view.ViewGroup
import io.github.lee.core.ui.adapter.DataBindingAdapter
import io.github.lee.jel.databinding.ItemMainMediaBinding
import io.github.lee.jel.domain.po.JellyfinSession

class MainMediaAdapter : DataBindingAdapter<JellyfinSession, ItemMainMediaBinding>() {
    override fun onCreateDataBinding(
        context: Context,
        inflater: LayoutInflater,
        parent: ViewGroup,
        viewType: Int
    ): ItemMainMediaBinding =
        ItemMainMediaBinding.inflate(inflater, parent, false)

    override fun onItemHolder(binding: ItemMainMediaBinding, item: JellyfinSession) {
        binding.item = item
    }

}